package com.zpf.pojo;
/**
 * 
Create Table

CREATE TABLE `tb_cart` (
  `id` int(11) NOT NULL,
  `pid` int(11) NOT NULL DEFAULT '0',
  `Num` int(11) DEFAULT NULL,
  `money` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`,`pid`),
  KEY `fk_cart_pid` (`pid`),
  CONSTRAINT `fk_cart_id` FOREIGN KEY (`id`) REFERENCES `tb_user` (`id`),
  CONSTRAINT `fk_cart_pid` FOREIGN KEY (`pid`) REFERENCES `tb_goods` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

 * @author wgy
 *
 */
public class Cart {
	private int id;
	private int pid;
	private int num;
	private double money;
	private Goods goods;

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public Cart() {
		// TODO Auto-generated constructor stub
	}
	public Cart(int id, int pid, int num, double money) {
		super();
		this.id = id;
		this.pid = pid;
		this.num = num;
		this.money = money;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public double getMoney() {
		return money;
	}
	public void setMoney(double money) {
		this.money = money;
	}
	@Override
	public String toString() {
		return "Cart [id=" + id + ", pid=" + pid + ", num=" + num + ", money=" + money + "]";
	}
	
}
